Repository navigation
fix: unify lineNumberAreaWidth to resolve wide left panel - #703
pppanghu77 wants to merge 1 commit into
Conversation
1. Root cause: LeftAreaTextEdit::lineNumberAreaWidth() returned an inflated width (13 + adv*digits + 40) while TextEdit's version returned max(15, adv*digits), causing LineNumberArea::sizeHint() to use the inflated value for initial layout 2. Fix: delegate to m_pTextEdit->lineNumberAreaWidth() so sizeHint() and setFixedWidth() use the same width, eliminating the conflict 3. Impact: blank tab left panel no longer starts oversized; no change to normal width after updateLeftWidgetWidth() correction Log: fix blank tab left panel width inconsistency on startup Influence: 1. Verify blank tab left panel width is correct on startup 2. Verify left panel width after closing and reopening tabs 3. Test line number area width with large files fix: 统一行号区宽度计算消除左侧栏偏宽 1. 根因:LeftAreaTextEdit::lineNumberAreaWidth() 返回膨胀宽度 (13 + adv*digits + 40),而 TextEdit 版本返回 max(15, adv*digits), 导致 LineNumberArea::sizeHint() 用膨胀值做初始布局 2. 方案:委托调用 m_pTextEdit->lineNumberAreaWidth(),使 sizeHint() 与 setFixedWidth() 使用同一宽度值,消除双实现冲突 3. 影响:空白标签页左侧栏不再初始偏宽;updateLeftWidgetWidth() 纠正后的宽度无变化 Log: 修复空白标签页左侧栏宽度偏大的问题 Influence: 1. 验证打开空白标签页时左侧栏宽度正常 2. 验证关闭后重新打开标签页的左侧栏宽度 3. 测试大文件场景下行号区宽度 PMS: BUG-174621
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: pppanghu77 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe PR removes the duplicate, inflated line-number width calculation from LeftAreaTextEdit and delegates to TextEdit's shared calculation, keeping initial sizing consistent while preserving corrected widths after updates. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
TAG Bot New tag: 6.6.10 |
|
TAG Bot New tag: 6.6.11 |
|
TAG Bot New tag: 6.6.12 |
|
TAG Bot New tag: 6.6.13 |
fix: unify lineNumberAreaWidth to resolve wide left panel
inflated width (13 + advdigits + 40) while TextEdit's version
returned max(15, advdigits), causing LineNumberArea::sizeHint()
to use the inflated value for initial layout
and setFixedWidth() use the same width, eliminating the conflict
to normal width after updateLeftWidgetWidth() correction
Log: fix blank tab left panel width inconsistency on startup
Influence:
fix: 统一行号区宽度计算消除左侧栏偏宽
(13 + advdigits + 40),而 TextEdit 版本返回 max(15, advdigits),
导致 LineNumberArea::sizeHint() 用膨胀值做初始布局
与 setFixedWidth() 使用同一宽度值,消除双实现冲突
纠正后的宽度无变化
Log: 修复空白标签页左侧栏宽度偏大的问题
Influence:
PMS: BUG-174621
Summary by Sourcery
Bug Fixes: